﻿function GetRootPath() {
    var rootPath = "";
    var list = document.location.pathname.split('/');
    if (list.length > 1 && list[1] != "") {
        rootPath = list[1];
    }
    rootPath = "/" + rootPath;
    return rootPath;
}

function openDlgWindow(senderPage, title, url, callBack, showMast, width, height, topPos, leftPos, cType, id) {
    if (url.indexOf("http://") == -1) {
        url = GetRootPath() + url
    }
    //if(!Boolean(Number(width))){width = 500;}
    //if(!Boolean(Number(height))){height = 500;}
    //if(!Boolean(Number(topPos))){topPos = 500;}
    //if(!Boolean(Number(leftPos))){leftPos = 500;}
    top.openPopWindow(senderPage, title, url, callBack, showMast, width, height, topPos, leftPos, cType, id);
}
